package com.pand.model.alarm;

import com.pand.model.BaseObject;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by leber on 2017/8/29.
 */
@Entity
@Table(name = "BIZ_ELECTRIC_FENCE")
@SequenceGenerator(name = "SeqElectricFence", sequenceName = "SEQ_ELECTRIC_FENCE", allocationSize = 1)
public class ElectricFence extends BaseObject {
    private Integer id;//主键id
    private Integer vehicleTypeId;//适应车型id
    private String vehicleTypeName;//适应车型名称
    private String cityCode;//适应城市代码
    private String cityName;//适应城市名称
    private Integer type;//围栏类型，1：多边形
    private String range;//围栏范围，有序格式：经度_纬度,经度_纬度
    private Integer alarmType;//告警类型：1(驶出围栏)、2(驶入围栏)、3(驶入驶出围栏)
    private Integer isEnable;//是否启用
    private Integer creator;//创建人id
    private String creatorName;//创建人名称
    private Integer isDeleted;//是否被删除
    private Integer updator;//更新人id
    private String updatorName;//更新人名称
    private Date createTime;//创建时间
    private Date updateTime;//更新时间

    @Id
    @GeneratedValue(generator = "SeqElectricFence")
    @Column(name = "ID")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name = "VEHICLE_TYPE_ID")
    public Integer getVehicleTypeId() {
        return vehicleTypeId;
    }

    public void setVehicleTypeId(Integer vehicleTypeId) {
        this.vehicleTypeId = vehicleTypeId;
    }
    @Transient
    public String getVehicleTypeName() {
        return vehicleTypeName;
    }

    public void setVehicleTypeName(String vehicleTypeName) {
        this.vehicleTypeName = vehicleTypeName;
    }
    @Column(name = "CITY_CODE")
    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
    @Transient
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    @Column(name = "TYPE")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Column(name = "RANGE")
    public String getRange() {
        return range;
    }

    public void setRange(String range) {
        this.range = range;
    }
    @Column(name = "ALARM_TYPE")
    public Integer getAlarmType() {
        return alarmType;
    }

    public void setAlarmType(Integer alarmType) {
        this.alarmType = alarmType;
    }

    @Column(name = "IS_ENABLE")
    public Integer getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Integer isEnable) {
        this.isEnable = isEnable;
    }
    @Column(name = "IS_DELETED")
    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Column(name = "CREATOR")
    public Integer getCreator() {
        return creator;
    }

    public void setCreator(Integer creator) {
        this.creator = creator;
    }
    @Transient
    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }
    @Column(name = "UPDATOR")
    public Integer getUpdator() {
        return updator;
    }

    public void setUpdator(Integer updator) {
        this.updator = updator;
    }
    @Transient
    public String getUpdatorName() {
        return updatorName;
    }

    public void setUpdatorName(String updatorName) {
        this.updatorName = updatorName;
    }
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "UPDATE_TIME")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
